import { AutoIncrementId, Code, Cover, CreateDate, DateTime, Desc, Digdit, Jsonb, Money, PrimaryUuid, Title, UpdateDate, Uuid } from "../utils";
import { Entity } from "typeorm";

@Entity({ name: 'fuli_activity' })
export class FuliActivity {
    @PrimaryUuid()
    id: string;

    @AutoIncrementId()
    activity_id: number;

    @Title()
    title: string;

    @Money({ default: 0 })
    money: number;

    @Digdit({ default: 0 })
    people_count: number;

    @Desc({ default: '' })
    desc: string;

    @Cover()
    cover: string;

    @DateTime()
    start_date: Date;

    @DateTime()
    end_date: Date;

    @Money({ default: 0 })
    used_money: number;

    @Money({ default: 0 })
    refund_money: number;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;

    @Code({ default: '0' })
    status: string;

    @Jsonb({ default: {} })
    setting: any;

    @Uuid({ comment: '企业ID' })
    company_id: string;

    @Uuid({ comment: '创建人' })
    create_user_id: string;

    @Uuid({ nullable: true })
    money_log_id: string;
}
